package com.cloud.action;

import com.cloud.ui.ControlQuickMapService;
import com.supermap.desktop.core.Application;
import com.supermap.desktop.core.Interface.IBaseItem;
import com.supermap.desktop.core.Interface.IDockbar;
import com.supermap.desktop.core.implement.CtrlAction;

/**
 * @author supermap
 */
public class CtrlActionQuickMapService extends CtrlAction {

	public CtrlActionQuickMapService(IBaseItem caller) {
		super(caller);
	}

	@Override
	public void run() {
		Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
			// pass 覆盖默认的捕捉器
		});
		IDockbar dockBar = Application.getActiveApplication().getMainFrame().getDockbarManager().get(ControlQuickMapService.class);
		dockBar.setVisible(true);
		dockBar.active();
	}

	@Override
	public boolean enable() {
		return true;
	}

	@Override
	public boolean check() {
		return super.check();
	}
}
